package com.china08.yxyapi.api.manage.tec.teaching.lecture.prepare;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.china08.yxyapi.api.YxyApiBaseController;
import com.china08.yxyapi.util.YxUserPointsUtilV3;

import io.swagger.annotations.ApiOperation;

/**
 * 老师 ---备授课--去上课超过十分钟增加积分
 * 
 */
@CrossOrigin
@RestController
public class LecturePrePackAddIntegralController extends YxyApiBaseController {

    @Autowired
    private YxUserPointsUtilV3 yxUserPointsUtilV3;

    @ApiOperation(value = "老师 ---备授课--添加积分")
    @RequestMapping(value = "/api_yw/manage/tec/teaching/lecture/prepare/integral/add", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public Object process(HttpServletRequest request, HttpServletResponse response) {

        String userId = getProfile(request, response).getId();

        yxUserPointsUtilV3.tackclass(userId);

        return "成功";
    }

}
